// 导入axios
import request from '@/utils/request.js'

// 根据关键字搜索香瓜的文章
export function apiSearchList ({ q,page = 1,perPage = 10}) {
    return request({
        url: '/app/v1_0/search',
        method: 'get',
        params: {
            q,
            page,
            per_page: perPage
        }
    })
}

// 搜索相关的api函数制作
export function apiSearchSuggestion (q) {
    return request({
        url: '/app/v1_0/suggestion',
        method: 'get',
        params: {
            q
        }
    })
}